<?php 
class UpcomingGroup extends Upcoming {
	
// constructor ----------------------------------------------------------------------	
	public function __construct($key) {
		# set api key
		if(!$key) :
			die('No api key');
		endif;
		$this->apiKey = $key;	
	}

// getInfo --------------------------------------------------------------------------	
	public function getInfo($params) {
		$xml = $this->send('group.getInfo', $params);
		$data = $this->parse($xml);
		$this->data = $this->formatGroupData($data);
		return $this;
	} // getInfo
	
	private function formatGroupData($data) {
		return $data['group_attr'];
	} // formatGroupData


// get Events -----------------------------------------------------------------------	
	public function getEvents($params) {
		$xml = $this->send('group.getEvents', $params);
		$data = $this->parse($xml);
		if(isset($data['event'])) :
			return $this->formatEventsData($data['event']);
		else :
			return false;
		endif;
	} // getEvents
} // UpcomingGroup
?>